<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title></title>
<#include "/admin/head.html"/>


<script type="text/javascript"> 
function getTableForm() {
	return document.getElementById('jvForm');
}
function optDelete() {
	if(Pn.checkedCount('ids')<=0) {
		alert("请选择您要操作的数据");
		return;
	}
	if(!confirm("您确定删除吗？")) {
		return;
	}
	var f = getTableForm();
	f.action="o_tsurveypartnerDelete.do";
	f.submit();
}


$(function() {
	$("#jvForm").validate();
});

</script>
</head>
<body>

<div class="box-positon">
	<div class="rpos">当前位置: 问卷参与者 - 列表</div>

	<div class="clear"></div>
</div>
<div class="body-box">
<form id="jvForm" action="v_tsurveypartnerList.do" method="post" style="padding-top:5px;">
   
   问卷主题:               <select  name="surverytype" >
              <option value="">--请选择--</option>
                <#list surverytypeMap?keys as idKey>
              <option value="${idKey}" <#if idKey==tsurveypartner.surverytype!?string> selected</#if> > ${surverytypeMap[idKey]}</option>
               </#list>
              </select>
	<input type="submit" class="query"  value="查询"/>
<!--
</form>

<form id="tableForm" method="post">
-->
<hr></hr>

<input type="hidden" name="pageNo" value=""/>
<table class="pn-ltable" style="" width="100%" cellspacing="1" cellpadding="0" border="0">
<thead class="pn-lthead"><tr>
	<th width="20"><input type='checkbox' onclick='Pn.checkbox("ids",this.checked)'/></th>      	 <th>问卷主题</th>
   	 <th>提交人姓名</th>
   	 <th>手机号码</th>
   	 <th>提交时间</th>	<th width="90">操作选项</th>   </tr></thead>
<tbody  class="pn-ltbody">
<#list pagination.list as c>
<tr>
 <td><input type='checkbox' name='ids' value='${c.partnerid}'/></td>
  <td>  <#list surverytypeMap?keys as idKey><#if idKey==c.surverytype!?string> ${surverytypeMap[idKey]}</#if></#list></td>
 <td>${c.partnername!?html}</td>
 <td>${c.phone!?html}</td>
  <td><#if (c.createtime)?? >${c.createtime?string('yyyy-MM-dd')}</#if></td>
	<td align="center">		
   <a href="v_tsurveypartnerDetail.do?partnerid=${c.partnerid}" class="pn-opt">详情</a> | 	
   <a href="o_tsurveypartnerDelete.do?ids=${c.partnerid}" onclick="if(!confirm('您确定删除吗？')) {return false;}" class="pn-opt">删除</a>
   </td>
</tr>
</#list>
</tbody>
</table>            <table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td align="center" class="pn-sp">
                共 ${pagination.totalCount} 条&nbsp;
                每页 ${pagination.pageSize} 条&nbsp;
                               <!-- <input type="text" value="20" style="width:30px" onfocus="this.select();" onblur="$.cookie('_cookie_page_size',this.value,{expires:3650});" onkeypress="if(event.keyCode==13){$(this).blur();return false;}"/>-->

                <input type="button" class="first-page"value="首 页" onclick="_gotoPage('1');"<#if pagination.firstPage> disabled="disabled"</#if>/>
                <input type="button" class="pre-page" value="上一页" onclick="_gotoPage('${pagination.prePage}');"<#if pagination.firstPage> disabled="disabled"</#if>/>
                <input type="button" class="next-page" value="下一页" onclick="_gotoPage('${pagination.nextPage}');"<#if pagination.lastPage> disabled="disabled"</#if>/>
                <input type="button" class="last-page" value="尾 页" onclick="_gotoPage('${pagination.totalPage}');"<#if pagination.lastPage> disabled="disabled"</#if>/>&nbsp;
                当前 ${pagination.pageNo}/${pagination.totalPage} 页 &nbsp;转到第<input type="text" id="_goPs" style="width:50px" onfocus="this.select();" onkeypress="if(event.keyCode==13){$('#_goPage').click();return false;}"/>页
                <input id="_goPage" class="go"  type="button" value="转" onclick="_gotoPage($('#_goPs').val());"<#if pagination.totalPage==1> disabled="disabled"</#if>/>
            </td>
            </tr>
            </table><script type="text/javascript"> 
function _gotoPage(pageNo) {
	try{
		var tableForm = getTableForm();
		$("input[name=pageNo]").val(pageNo);
		tableForm.action="v_tsurveypartnerList.do";
		tableForm.onsubmit=null;
		tableForm.submit();
	} catch(e) {
		alert('_gotoPage(pageNo)方法出错');
	}
}
</script><div><input type="button" class="del-button"  value="删除" onclick="optDelete();"/>	</div>
</form>
</div>
<#if questionList??>
	<#if (questionList?size>0)>
	<div style="width: 80%;margin:20px auto;padding: 15px;border: 1px solid lightgray;">
	<h1 style="text-align: left;padding-left: 20px;">统计:</h1>
	<#list questionList as q>
		<hr/>
		${q.questionseq!?html}.${q.questionname!?html}<br/>
		<#list q.tsurveyoptionses as o>
			${o.optionseq!?html}.${o.optiondesc!?html}
			<br/>
		</#list>
		<br/>
		<#list q.statisticses as s>
			${s.answer!?html}:${s.count!?html}
		</#list>
	</#list>
	</div>
	</#if>
</#if>
</body>
</html>